.class final Lcom/direction/hold/ui/c;
.super Ljava/lang/Thread;


# instance fields
.field private synthetic a:Lcom/direction/hold/ui/CountActivity;


# direct methods
.method constructor <init>(Lcom/direction/hold/ui/CountActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .locals 4

    invoke-super {p0}, Ljava/lang/Thread;->run()V

    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v0, v0, Lcom/direction/hold/ui/CountActivity;->x:Lcn/cheln/explorer/ds/scan/ScanUpdateReceiver;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    new-instance v1, Lcn/cheln/explorer/ds/scan/ScanUpdateReceiver;

    iget-object v2, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    invoke-direct {v1, v2}, Lcn/cheln/explorer/ds/scan/ScanUpdateReceiver;-><init>(Landroid/app/Activity;)V

    iput-object v1, v0, Lcom/direction/hold/ui/CountActivity;->x:Lcn/cheln/explorer/ds/scan/ScanUpdateReceiver;

    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "android.intent.action.MEDIA_SCANNER_FINISHED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "com.lewa.app.filemanager.receiveScanSignal"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "com.lewa.app.filemanager.scanning"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v2, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v2, v2, Lcom/direction/hold/ui/CountActivity;->x:Lcn/cheln/explorer/ds/scan/ScanUpdateReceiver;

    invoke-virtual {v1, v2, v0}, Lcom/direction/hold/ui/CountActivity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    new-instance v1, Lcn/cheln/explorer/util/MusicBroadcastReceiver;

    invoke-direct {v1}, Lcn/cheln/explorer/util/MusicBroadcastReceiver;-><init>()V

    invoke-static {v0, v1}, Lcom/direction/hold/ui/CountActivity;->a(Lcom/direction/hold/ui/CountActivity;Lcn/cheln/explorer/util/MusicBroadcastReceiver;)Lcn/cheln/explorer/util/MusicBroadcastReceiver;

    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "com.android.music.metachanged"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "com.android.music.queuechanged"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "com.android.music.playbackcomplete"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "com.android.music.playstatechanged"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v2, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    invoke-static {v2}, Lcom/direction/hold/ui/CountActivity;->a(Lcom/direction/hold/ui/CountActivity;)Lcn/cheln/explorer/util/MusicBroadcastReceiver;

    move-result-object v2

    invoke-virtual {v1, v2, v0}, Lcom/direction/hold/ui/CountActivity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    :cond_0
    const-wide/16 v0, 0x76c

    :try_start_0
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v0, v0, Lcom/direction/hold/ui/CountActivity;->y:Lcn/cheln/explorer/util/PackageReceiver;

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    new-instance v1, Lcn/cheln/explorer/util/PackageReceiver;

    iget-object v2, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    invoke-direct {v1, v2}, Lcn/cheln/explorer/util/PackageReceiver;-><init>(Landroid/app/Activity;)V

    iput-object v1, v0, Lcom/direction/hold/ui/CountActivity;->y:Lcn/cheln/explorer/util/PackageReceiver;

    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    const-string v1, "android.intent.action.PACKAGE_ADDED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "android.intent.action.PACKAGE_REMOVED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v1, "package"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v2, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    iget-object v2, v2, Lcom/direction/hold/ui/CountActivity;->y:Lcn/cheln/explorer/util/PackageReceiver;

    invoke-virtual {v1, v2, v0}, Lcom/direction/hold/ui/CountActivity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    new-instance v0, Lcn/cheln/explorer/util/SDcardCheck$MediaScannerBroadcast;

    invoke-direct {v0}, Lcn/cheln/explorer/util/SDcardCheck$MediaScannerBroadcast;-><init>()V

    sput-object v0, Lcn/cheln/explorer/util/SDcardCheck;->c:Lcn/cheln/explorer/util/SDcardCheck$MediaScannerBroadcast;

    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    sget-object v1, Lcn/cheln/explorer/util/SDcardCheck;->c:Lcn/cheln/explorer/util/SDcardCheck$MediaScannerBroadcast;

    invoke-static {v0, v1}, Lcn/cheln/explorer/util/SDcardCheck;->a(Landroid/content/Context;Landroid/content/BroadcastReceiver;)V

    :cond_1
    iget-object v0, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    new-instance v1, Landroid/content/Intent;

    iget-object v2, p0, Lcom/direction/hold/ui/c;->a:Lcom/direction/hold/ui/CountActivity;

    const-class v3, Lcn/cheln/explorer/ds/scan/ScanService;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v0, v1}, Lcom/direction/hold/ui/CountActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_0
.end method
